//
//  HMShoppingCarModel.m
//  HowToDo
//
//  Created by 宋轩 on 17/1/7.
//  Copyright © 2017年 KY. All rights reserved.
//

#import "HMShoppingCarModel.h"

@implementation HMShoppingCarModel

//coding方法
- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.resource_id forKey:@"tid"];
    [aCoder encodeObject:self.image_url forKey:@"image"];
    [aCoder encodeObject:self.resource_name forKey:@"name"];
    [aCoder encodeObject:self.resource_content forKey:@"content"];
    [aCoder encodeObject:self.resource_enclosure forKey:@"enclosure"];
    [aCoder encodeObject:self.price forKey:@"price"];
}

- (instancetype)initWithCoder:(NSCoder *)coder
{
    self = [super init];
    if (self) {
        self.resource_id = [coder decodeObjectForKey:@"tid"];
        self.image_url = [coder decodeObjectForKey:@"image"];
        self.resource_name = [coder decodeObjectForKey:@"name"];
        self.resource_content = [coder decodeObjectForKey:@"content"];
        self.resource_enclosure = [coder decodeObjectForKey:@"enclosure"];
        self.price = [coder decodeObjectForKey:@"price"];
    }
    return self;
}

@end
